package com.nondo.rdp.finance.model.circle;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.nondo.rdp.finance.domain.circle.Circle;
import com.nondo.rdp.auth.model.UserBeanInner;

/**
 * 金融圈-说说
 */
public class CircleBean {
	private Long id; // 主键ID
	private String body; // 内容
	private String imagePaths; // 图片路径
	private Long uid; // 用户ID
	private UserBeanInner user; // 用户信息

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	@JsonIgnore
	public String getImagePaths() {
		return imagePaths;
	}

	@JsonSetter
	public void setImagePaths(String imagePaths) {
		this.imagePaths = imagePaths;
	}

	@JsonIgnore
	public Long getUid() {
		return uid;
	}

	@JsonSetter
	public void setUid(Long uid) {
		this.uid = uid;
	}

	public UserBeanInner getUser() {
		return user;
	}

	public void setUser(UserBeanInner user) {
		this.user = user;
	}

	public static CircleBean covert2Bean(Circle circleDb) {
		CircleBean circleBean = new CircleBean();
		circleBean.setId(circleDb.getId());
		circleBean.setBody(circleDb.getBody());
		UserBeanInner user = UserBeanInner.covert2Bean(circleDb.getUser());
		circleBean.setUser(user);
		return circleBean;
	}
}